package com.ieds.core.model;

import java.util.Objects;

/**
 * @Auther: wanglei
 * @Date: 2020.05.22
 * @Description: kettle资源库的dababase实体类
 */
public class RDatabase {
    //dataBaseID
    private Long idDatabase;
    //名称
    private String name;
//    //数据库类型
//    private String typeName;
    //数据库地址
    private String hostName;
    //数据库名称
    private String databaseName;
    //端口
    private Integer port;
    //用户名
    private String username;

    public Long getIdDatabase() {
        return idDatabase;
    }

    public void setIdDatabase(Long idDatabase) {
        this.idDatabase = idDatabase;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

//    public String getTypeName() {
//        return typeName;
//    }
//
//    public void setTypeName(String typeName) {
//        this.typeName = typeName;
//    }
//
    public String getHostName() {
        return hostName;
    }

    public void setHostName(String hostName) {
        this.hostName = hostName;
    }

    public String getDatabaseName() {
        return databaseName;
    }

    public void setDatabaseName(String databaseName) {
        this.databaseName = databaseName;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RDatabase rDatabase = (RDatabase) o;
        return Objects.equals(idDatabase, rDatabase.idDatabase) &&
                Objects.equals(name, rDatabase.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(idDatabase, name);
    }

    @Override
    public String toString() {
        return "RDatabase{" +
                "idDatabase=" + idDatabase +
                ", name='" + name + '\'' +
                ", hostName='" + hostName + '\'' +
                ", databaseName='" + databaseName + '\'' +
                ", port=" + port +
                ", username='" + username + '\'' +
                '}';
    }
}
